package main

import (
	"fmt"
)

func main() {
	nums1 := []int{1, 2, 3, 4, 5, 6}
	nums2 := []int{1, 2, 3, 4, 5, 6}
	nums3 := []int{}
	nums := []int{7, 8, 9, 10}

	copy(nums1, nums)
	fmt.Println(nums1) //[7 8 9 10 5 6]

	copy(nums2[1:], nums[1:3])
	fmt.Println(nums2) //[1 8 9 4 5 6]

	copy(nums3, nums[2:])
	fmt.Println(nums3) //[]	不可以超过长度范围

	allResult := make([][]int, 0)
	allResult = append(allResult, nums1, nums2, nums3)
	fmt.Println(allResult) //[[7 8 9 10 5 6] [1 8 9 4 5 6] []]

}
